﻿
using System;
using System.Runtime.CompilerServices;
using System.Windows.Forms;


using Shine.ManageUser;

using System.Collections.Generic;
using System.Drawing;

namespace Shine.Framework
{
    public interface IFramework
    {
        IUser User { set; get; }

        //IEditor Editor { set; get; }
        /// <summary>
        /// 得到停靠控件中的数据控件
        /// </summary>
        /// <param name="strName"></param>
        /// <returns></returns>
        object GetControlUserData(string strName);

        /// <summary>
        /// 作用于画完图形后输入相关信息后停靠位置使用
        /// </summary>
        /// <param name="x"></param>
        /// <param name="y"></param>
        /// <returns></returns>
       // Point LocationPoint(int x, int y);

        event OnDockWindowEventHandler OnDockWindowEvent;
        event OnMapPageSwitchEventHandler OnMapPageSwitchEvent;

        IBarManager BarManager { get; set; }

        ITool Tool { get; set; }

        IDockManager DockManager { get; set; }
        

     //   object Object { get; set; }

        double SnapTolerance { get; set; }

        double Tolerance { get; set; }

        SuperMap.UI.MapControl MapControl { get; }
        SuperMap.UI.SceneControl SceneControl { get;  }
        SuperMap.UI.SceneControl SceneControl2 { get; }
        SuperMap.UI.LayersControl LayersControl { get;  }
        SuperMap.UI.WorkspaceControl WorkspaceControl { get;  }
        SceneActionEnum SceneAction { get; set; }
         string SelectedRoute
        {
            get; set;
        }
        string PoiName
        {
            get; set;
        }
        bool IsMutualMap
        {
            get;
            set;

        }
        bool IsScneCompare
        {
            get;set;
        }


        void RaiseMapPageSwitchEvent();

        /// <summary>
        /// 是显示数据视图还是页面视图
        /// </summary>
        bool IsMapCtrlactive
        {
            get;
        }
         bool IsPageLayoutActive
        {
            get;
           
        }
         bool IsSceneCtlActive
         {
             get;

         }
        void ActivateMapControl();

        void ActivatePageLayoutControl();
        void ActivateSceneControl();

        Form MdiForm { get; set; }

        void DelayEvents(bool delay);

        void ExecuteCommand(ICommand pCommand);

        void ResetCurrentTool();

        void UpdateContent();

        void BindControls(SuperMap.UI.MapControl mapControl, SuperMap.UI.SceneControl sceneControl, SuperMap.UI.SceneControl sceneControl2,SuperMap.UI.WorkspaceControl wksControl, SuperMap.UI.LayersControl lyrControl, bool activateMapFirst);
        
            //
            // 摘要:
            //     关闭相应图层
            //
            // 参数:
            //   datasets:
            //  void UnVisibleLayersFromMapControl(List<IDataset> datasets);
            //
            // 摘要:
            //     打开相应图层
            //
            // 参数:
            //   datasets:
            //  void VisibleLayersFromMapControl(List<IDataset> datasets);
            //
            // 摘要:
            //     主界面移出所有窗体函数
            //
            // 参数:
            //   datasets:
            //  void RemoveLayersFromMapControl(List<IDataset> datasets);

            //
            // 摘要:
            //     给当前的MapControl添加图层
            //
            // 参数:
            //   layers:
            //     图层
            // void AddLayersToMapControl(ILayer[] layers);



        }
}

#region 注释掉的代码
//void SetHook(object hook);
//void ActivateSceneControl();
//IActiveView ActiveView { get;}
//void ActivateGlobeControl();
//Control ActiveMapControl { get; set; }
//IAppInfo AppInfo { get; set; } 
//object MainHook { get; set; }   
//object SecondaryHook { get; set; }

//ICommandItem cmdItem;
//UID editUid = new UIDClass();
//editUid.Value = "esriEditor.EditTool";
//cmdItem = m_app.Document.CommandBars.Find(editUid, false, false);
//m_app.CurrentTool = cmdItem;
#endregion